package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;

/**
 * 质检对象 sd_quality_result
 *
 * @author qijian
 * @date 2024-02-27
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("sd_quality_result")
public class SdQualityResult extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "id")
    private Long id;

    @Excel(name = "流转卡号")
    @ApiModelProperty(value = "流转卡号")
    private String circulationNo;

    @Excel(name = "物料id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "物料id")
    private Long itemId;

    @Excel(name = "物料编码")
    @ApiModelProperty(value = "物料编码")
    private String itemCode;

    @Excel(name = "物料名称")
    @ApiModelProperty(value = "物料名称")
    private String itemName;

    @Excel(name = "工序id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "工序id")
    private Long fmProcessId;

    @Excel(name = "工序顺序")
    @ApiModelProperty(value = "工序顺序")
    private BigDecimal sort;

    @Excel(name = "工序名称")
    @ApiModelProperty(value = "工序名称")
    private String processName;

    @Excel(name = "批号")
    @ApiModelProperty(value = "批号")
    private String batchNo;

    @Excel(name = "总检查量")
    @ApiModelProperty(value = "总检查量")
    private BigDecimal qty;

    @Excel(name = "不合格量")
    @ApiModelProperty(value = "不合格量")
    private BigDecimal qualifiedQty;

    @Excel(name = "提交批次号")
    @ApiModelProperty(value = "提交批次号")
    private String subNo;

    @Excel(name = "质检表id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "质检表id")
    private Long examineId;

    @Excel(name = "质检结果")
    @ApiModelProperty(value = "质检结果")
    private Boolean isQualified;

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Excel(name = "质检类型")
    @ApiModelProperty(value = "质检类型")
    private String type;

    @Excel(name = "线路id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "线路id")
    private Long lineId;

    @Excel(name = "是否暂停0 正常 1暂停")
    @ApiModelProperty(value = "是否暂停0 正常 1暂停")
    private Boolean status;

    @Excel(name = "是否为库存质检")
    @ApiModelProperty(value = "是否为库存质检")
    private Boolean isInventoryExamine;

    @Excel(name = "质检类型", readConverterExp = "库=存质检，模具质检，常规质检")
    @ApiModelProperty(value = "质检类型（库存质检，模具质检，常规质检）")
    private String examineType;

    @Excel(name = "检测数量单位")
    @ApiModelProperty(value = "检测数量单位")
    private String unit;

    @Excel(name = "数据是否已上传")
    @ApiModelProperty(value = "数据是否已上传")
    private Boolean dataUpload;

    @Excel(name = "客户是否承认")
    @ApiModelProperty(value = "客户是否承认")
    private Boolean customerApproval;

    @Excel(name = "检验归属")
    @ApiModelProperty(value = "检验归属")
    private String examineBelong;

    @Excel(name = "质检人")
    @ApiModelProperty(value = "质检人")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty(value = "生产订单")
    private String orderNo;

    @TableField(exist = false)
    @ApiModelProperty(value = "销售订单号")
    private String number;

    @ApiModelProperty("已经提交")
    private Boolean isSubmit;

}
